import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Test {
    static Scanner scanner=new Scanner(System.in);
    //所有车辆
    static Map<String,Map<String, ArrayList<Vehicle>>> allVehicle=new HashMap<>();
    //借出去的车

    static ArrayList<Vehicle> rentVehicle=new ArrayList<>();
    //先存储车辆
    static {
        ArrayList<Vehicle> buss=new ArrayList<>();
        buss.add(new Bus("申沃客车","沪BTK666",1500));
        buss.add(new Bus("申沃客车","沪BTK667",1500));
        buss.add(new Bus("申沃客车","沪BTK668",1500));

        ArrayList<Vehicle> cars=new ArrayList<>();
        cars.add(new Car("奔驰","赣BTK001",500,"C 200 L时尚型运动轿车"));
        cars.add(new Car("奔驰","赣BTK001",500,"C 200 L时尚型运动轿车"));
        cars.add(new Car("奔驰","赣BTK001",500,"C 200 L时尚型运动轿车"));

        ArrayList<Vehicle> cars1=new ArrayList<>();
        cars1.add(new Car("宝马","赣BTK001",400,"C 200 L时尚型运动轿车"));
        cars1.add(new Car("宝马","赣BTK002",400,"C 200 L时尚型运动轿车"));
        cars1.add(new Car("宝马","赣BTK003",400,"C 200 L时尚型运动轿车"));

        ArrayList<Vehicle> cars2=new ArrayList<>();
        cars2.add(new Car("奥迪","赣BTK001",550,"Audi A8"));
        cars2.add(new Car("奥迪","赣BTK002",550,"Audi A8"));
        cars2.add(new Car("奥迪","赣BTK003",550,"Audi A8"));

        Map<String, ArrayList<Vehicle>> allCar=new HashMap<>();
        allCar.put("奔驰",cars);
        allCar.put("宝马",cars1);
        allCar.put("奥迪",cars2);

        Map<String, ArrayList<Vehicle>> allBus=new HashMap<>();
        allBus.put("申沃客车",buss);

        allVehicle.put("轿车",allCar);
        allVehicle.put("客车",allBus);
    }


    public static void main(String[] args) {
        System.out.println("********************欢迎来到黑马租车***********************");
        RentService rentService=new RentServiceImpl();
        while (true){
            System.out.println("请选择您的服务：1）租车服务 2）还车服务  3）退出系统");
            int select=scanner.nextInt();
            switch (select){
                case 1:
                    rentService.rentFlower();
                    break;
                case 2:
                    rentService.returnFlower();
                    break;
                case 3:
                    System.out.println("欢迎下次光临！！");
                    System.exit(0);
                default:
                    System.out.println("功能不存在，请重新输入！");
            }
        }

    }
}
